<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once BASE_PATH.'application/controllers/base'.EXT;


class Seo extends Base {
	
    public function __construct()
    {
         parent::__construct();
	 $this->load->model("sitemapdao");
	 $this->load->model('articulodao');
	 
    }
    
    public function index()
    {
	
	
	//$this->sitemapdao->save('noticias');
	//$this->sitemapdao->save('articulos');
	
	$videos = $this->articulodao->_select(array('where'=>array('tipo'=>'videos')));
	$_videos = array();
        
	foreach($videos as $video)
	    $_videos[] = (Object)array('url'=>'video/'.$video->articulo_k);
	
	$this->sitemapdao->save('videos',$_videos);
	//$this->sitemapdao->save('eventos');
    }
       
}
?>